<template>
  <div>
    <div>父组件</div>
    接受子传父：{{ toy }}
    <child @send-toy="getToy" />
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import child from "./child.vue";
let toy = ref("");
function getToy(val: string) {
  toy.value = val;
}
</script>

<style scoped></style>
